package com.yc.bean1;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zwei
 * @create 2024-07-28 15:23
 */
public class test2 {
    public static void main(String[] args) {
        //自动装配
        ApplicationContext context=new ClassPathXmlApplicationContext("beans.xml");
        Student student=(Student) context.getBean("s1");
        System.out.println(student);
    }
}
